package gui.testSetup.components;

/**
 * Determines what page the user is on in the new test wizard.
 * @author William Whitney
 */
public enum TestConfSetting
{

    CODE_LOCATION
    {

        public String getTitle()
        {
            return "Code Input";
        }

        public String getDescription()
        {
            String retStr = "";
            retStr += "Select java file you want to create JUnit test for below.\n";
            return retStr;
        }
    },
    TEST_HEADER
    {

        public String getTitle()
        {
            return "Setup Test Header";
        }

        public String getDescription()
        {
            String retStr = "";
            retStr += "Declare any objects you would like to use within the test setUp(),\n";
            retStr += "test tearDown() and test() methods. This field is optional.\n\n";
            retStr += "Example:\n";
            retStr += "Calculator testObj = new Calculator(Calculator.Postfix);\n";
            return retStr;
        }
    },
    SET_UP_METHOD
    {

        public String getTitle()
        {
            return "Test Setup";
        }

        public String getDescription()
        {
            String retStr = "";
            retStr += "Input the code you want to run before each JUnit test below.\n";
            retStr += "This field is optional.\n\n";
            retStr += "Example:\n";
       
            retStr += "testObj.push(\"3\");\n";
            retStr += "testObj.push(\"1\");\n";
            retStr += "testObj.push(\"+\");\n";

            return retStr;
        }
    },
    TEAR_DOWN_METHOD
    {

        public String getTitle()
        {
            return "Test Tear Down";
        }

        public String getDescription()
        {
            String retStr = "";
            retStr += "Input the code you want to run after each test below.\n";
            retStr += "This field is optional.\n\n";
            retStr += "Example:\n";
            retStr += "testObj.pop(\"+\");\n";
            retStr += "testObj.pop(\"1\");\n";
            retStr += "testObj.pop(\"3\");\n";
            return retStr;
        }
    };

    /**
     * Returns the title of the current page.
     * @return String title
     */
    public abstract String getTitle();

    /**
     * Returns the description of the current page.
     * @return String description
     */
    public abstract String getDescription();
}


